package com.qdlc.p2p.manage.action;

import com.opensymphony.xwork2.ModelDriven;
import com.qdlc.p2p.biz.web.action.BaseAction;
import com.qdlc.p2p.common.util.HttpUtil;
import com.qdlc.p2p.dal.common.SystemConfigHelper;
import org.apache.struts2.convention.annotation.Action;

/**
 * Created by hongbinglin on 2016/7/5.
 */
public class ManageSiteMapAction extends BaseAction implements ModelDriven {

    @Action("/modules/siteMap/siteMapConfig/siteMapAdd")
    public void clean() throws Exception {
        // 前台路径
        String web_url = SystemConfigHelper.getValue(SystemConfigHelper.Nid.WEB_URL);
        String url = web_url + "/siteMap/add.html";
        // 前台缓存清理
        String result = HttpUtil.getHttpsResponse(url);
        if (result.contains("ok")) {
            printSuccess();
        }
    }

}
